<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>MathFunc Test Report</title>
    <meta name="generator" content="HTMLTestRunner 0.8.2.2"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
    <link href="./bootstrap.min.css" rel="stylesheet">
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
    <script src="./echarts.common.min.js"></script>
    
<style type="text/css" media="screen">
body        { font-family: Microsoft YaHei,Tahoma,arial,helvetica,sans-serif;padding: 20px; font-size: 80%; }
table       { font-size: 100%; }
/* -- heading ---------------------------------------------------------------------- */
.heading {
    margin-top: 0ex;
    margin-bottom: 1ex;
}
.heading .description {
    margin-top: 4ex;
    margin-bottom: 6ex;
}
/* -- report ------------------------------------------------------------------------ */
#total_row  { font-weight: bold; }
.passCase   { color: #5cb85c; }
.failCase   { color: #d9534f; font-weight: bold; }
.errorCase  { color: #f0ad4e; font-weight: bold; }
.hiddenRow  { display: none; }
.testcase   { margin-left: 2em; }
</style>

</head>
<body >
<script language="javascript" type="text/javascript">
output_list = Array();
/*level 调整增加只显示通过用例的分类 --Findyou
0:Summary //all hiddenRow
1:Failed  //pt hiddenRow, ft none
2:Pass    //pt none, ft hiddenRow
3:All     //pt none, ft none
4:Error  
*/
function showCase(level) {
    trs = document.getElementsByTagName("tr");
    for (var i = 0; i < trs.length; i++) {
        tr = trs[i];
        id = tr.id;
        if (id.substr(0,2) == 'ft') {
            if (level == 2 || level == 0 ) {
                tr.className = 'hiddenRow';
            }
            else {
                tr.className = '';
            }
        }
        if (id.substr(0,2) == 'pt') {
            if (level < 2 || level ==4) {
                tr.className = 'hiddenRow';
            }
            else {
                tr.className = '';
            }
        }
    }
    //加入【详细】切换文字变化 --Findyou
    detail_class=document.getElementsByClassName('detail');
    //console.log(detail_class.length)
    if (level == 3) {
        for (var i = 0; i < detail_class.length; i++){
            detail_class[i].innerHTML="收起"
        }
    }
    else{
            for (var i = 0; i < detail_class.length; i++){
            detail_class[i].innerHTML="详细"
        }
    }
}
function showClassDetail(cid, count) {
    var id_list = Array(count);
    var toHide = 1;
    for (var i = 0; i < count; i++) {
        //ID修改 点 为 下划线 -Findyou
        tid0 = 't' + cid.substr(1) + '_' + (i+1);
        tid = 'f' + tid0;
        tr = document.getElementById(tid);
        if (!tr) {
            tid = 'p' + tid0;
            tr = document.getElementById(tid);
        }
        id_list[i] = tid;
        if (tr.className) {
            toHide = 0;
        }
    }
    for (var i = 0; i < count; i++) {
        tid = id_list[i];
        //修改点击无法收起的BUG，加入【详细】切换文字变化 --Findyou
        if (toHide) {
            document.getElementById(tid).className = 'hiddenRow';
            document.getElementById(cid).innerText = "详细"
        }
        else {
            document.getElementById(tid).className = '';
            document.getElementById(cid).innerText = "收起"
        }
    }
}
function html_escape(s) {
    s = s.replace(/&/g,'&');
    s = s.replace(/</g,'<');
    s = s.replace(/>/g,'>');
    return s;
}
</script>
<div class='heading'>
<h4 style="font-family: Microsoft YaHei">MathFunc Test Report</h4>
<p class='attribute'><strong>测试人员 : </strong> 天枢</p>
<p class='attribute'><strong>开始时间 : </strong> 2024-06-04 21:12:28</p>
<p class='attribute'><strong>合计耗时 : </strong> 0:00:14.412733</p>
<p class='attribute'><strong>测试结果 : </strong> 共 2 个用例，通过 2, 通过率=100.00%</p>

<p class='description'>generated by HTMLTestRunner.</p>
</div>
<div id="chart" style="width:50%;height:400px;float:left;"></div>


<p id='show_detail_line'>
<a class="btn btn-primary" href='javascript:showCase(0)'>概要{ 100.00% }</a>
<a class="btn btn-warning" href='javascript:showCase(4)'>错误{ 0 }</a>
<a class="btn btn-danger" href='javascript:showCase(1)'>失败{ 0 }</a>
<a class="btn btn-success" href='javascript:showCase(2)'>通过{ 2 }</a>
<a class="btn btn-info" href='javascript:showCase(3)'>所有{ 2 }</a>
</p>
<table id='result_table' class="table table-condensed table-bordered table-hover">
<colgroup>
<col align='left' />
<col align='right' />
<col align='right' />
<col align='right' />
<col align='right' />
<col align='right' />
<col align='right' />
</colgroup>
<tr id='header_row' class="text-center success" style="font-weight: bold;font-size: 14px;">
    <td>用例集/测试用例</td>
    <td>总计</td>
    <td>通过</td>
    <td>失败</td>
    <td>错误</td>
    <td>详细</td>
    <td>截图</td>
</tr>

<tr class='passClass warning'>
    <td>MyTestCase1</td>
    <td class="text-center">2</td>
    <td class="text-center">2</td>
    <td class="text-center">0</td>
    <td class="text-center">0</td>
    <td class="text-center"><a href="javascript:showClassDetail('c1',2)" class="detail" id='c1'>详细</a></td>
    <td class="text-center">断言或错误截图</td>
</tr>

<tr id='pt1_1' class='hiddenRow'>
    <td class='passCase' width='300px'><div class='testcase'>test_case1</div></td>
    <td colspan='5' align='left' width='600px'> <!--print 输出框位置-->

    <!-- 默认展开错误信息 -Findyou -->
    <button id='btn_pt1_1' type="button"  class="btn btn-success btn-xs" data-toggle="collapse" data-target='#div_pt1_1'>通过</button>
    <div id='div_pt1_1' class="collapse in">
    <pre style="overflow-y:scroll; overflow-x:hidden;height:200px; width:600px; margin:auto; border:1px solid #e1e1e1;">
    
pt1_1: 启动Case1
这是case1测试用例1
2024-06-04 21:12:29.360 automation_Demo.py[86] TestDisplayMark -&gt; {ClassName: 'ScreenMeasureToolsNS::MainWindow', Name: 'DisplayMark', ControlType: WindowControl} does not exist.
2024-06-04 21:12:35.410 automation_Demo.py[88] TestDisplayMark -&gt; {ClassName: 'ScreenMeasureToolsNS::MainWindow', Name: 'DisplayMark', ControlType: WindowControl} TraverseControls: 6, SearchTime: 6.017s[21:12:29.393613 - 21:12:35.410571]
2024-06-04 21:12:35.968 automation_Demo.py[89] TestDisplayMark -&gt; {ClassName: 'NStyleButton', Name: '新建工程', ControlType: ButtonControl} TraverseControls: 29, SearchTime: 0.055s[21:12:35.912868 - 21:12:35.968057]
2024-06-04 21:12:37.518 automation_Demo.py[93] TestDisplayMark -&gt; {ClassName: 'ProjectCreateDialog', ControlType: WindowControl} TraverseControls: 1, SearchTime: 0.002s[21:12:37.517427 - 21:12:37.518397]
2024-06-04 21:12:37.529 automation_Demo.py[93] TestDisplayMark -&gt; {ClassName: 'NLineDialogEdit', ControlType: EditControl} TraverseControls: 11, SearchTime: 0.011s[21:12:37.518397 - 21:12:37.529551]
2024-06-04 21:12:38.562 automation_Demo.py[95] TestDisplayMark -&gt; {ClassName: 'NStyleButton', Name: '确定', ControlType: ButtonControl} TraverseControls: 18, SearchTime: 0.026s[21:12:38.537411 - 21:12:38.562473]
2024-06-04 21:12:40.576 automation_Demo.py[98] TestDisplayMark -&gt; {ClassName: 'TopNavigationBar', ControlType: CustomControl} TraverseControls: 16, SearchTime: 0.556s[21:12:40.020592 - 21:12:40.576741]
2024-06-04 21:12:40.587 automation_Demo.py[98] TestDisplayMark -&gt; {ClassName: 'NStyleButton', Name: '返回首页 ', ControlType: ButtonControl} TraverseControls: 11, SearchTime: 0.010s[21:12:40.576741 - 21:12:40.587025]
2024-06-04 21:12:41.856 automation_Demo.py[101] TestDisplayMark -&gt; {ClassName: 'ModelDialogUI', ControlType: WindowControl} TraverseControls: 1, SearchTime: 0.001s[21:12:41.855425 - 21:12:41.856418]
2024-06-04 21:12:41.863 automation_Demo.py[101] TestDisplayMark -&gt; {ClassName: 'PushButtonEx', Name: '确定', ControlType: ButtonControl} TraverseControls: 7, SearchTime: 0.007s[21:12:41.856418 - 21:12:41.863923]
screenshot: 20240604_21.12.43 .png
2024-06-04 21:12:43.276 automation_Demo.py[107] TestDisplayMark -&gt; {ClassName: 'ProjectCardView', ControlType: ListControl} TraverseControls: 39, SearchTime: 0.041s[21:12:43.235683 - 21:12:43.276918]
2024-06-04 21:12:43.276 automation_Demo.py[107] TestDisplayMark -&gt; {Name: '按钮', ControlType: ListItemControl} TraverseControls: 1, SearchTime: 0.001s[21:12:43.276918 - 21:12:43.276918]
结束Case1


    </pre>
    </div>
    </td>
    <td align="right">
        <a  href="./images/20240604_21.12.43.png">
            <img   src="./images/20240604_21.12.43.png" height="200px" width="400px"/>
        </a>
    </td>
</tr>



<tr id='pt1_2' class='hiddenRow'>
    <td class='passCase' width='300px'><div class='testcase'>test_case2</div></td>
    <td colspan='5' align='left' width='600px'> <!--print 输出框位置-->

    <!-- 默认展开错误信息 -Findyou -->
    <button id='btn_pt1_2' type="button"  class="btn btn-success btn-xs" data-toggle="collapse" data-target='#div_pt1_2'>通过</button>
    <div id='div_pt1_2' class="collapse in">
    <pre style="overflow-y:scroll; overflow-x:hidden;height:200px; width:600px; margin:auto; border:1px solid #e1e1e1;">
    
pt1_2: 启动Case1
这是case1测试用例2
结束Case1


    </pre>
    </div>
    </td>
    <td align="right">
        <a hidden="hidden" href="">
            <img   src="" height="200px" width="400px"/>
        </a>
    </td>
</tr>



<tr id='total_row' class="text-center active">
    <td>总计</td>
    <td>2</td>
    <td>2</td>
    <td>0</td>
    <td>0</td>
    <td>通过率：100.00%</td>
    <td> <a href="" target="_blank"></a></td>
</tr>
</table>

<div id='ending'> </div>
    <div style=" position:fixed;right:50px; bottom:30px; width:20px; height:20px;cursor:pointer">
    <a href="#"><span class="glyphicon glyphicon-eject" style = "font-size:30px;" aria-hidden="true">
    </span></a></div>
    

        <script type="text/javascript">
            // 基于准备好的dom，初始化echarts实例
            var myChart = echarts.init(document.getElementById('chart'));

            // 指定图表的配置项和数据
            var option = {
                title : {
                    text: '测试执行情况',
                    x:'center'
                },
                tooltip : {
                    trigger: 'item',
                    formatter: "{a} <br/>{b} : {c} ({d}%)"
                },
                color: ['#95b75d', 'grey', '#b64645'],
                legend: {
                    orient: 'vertical',
                    left: 'left',
                    data: ['通过','失败','错误']
                },
                series : [
                    {
                        name: '测试执行情况',
                        type: 'pie',
                        radius : '60%',
                        center: ['50%', '60%'],
                        data:[
                            {value:2, name:'通过'},
                            {value:0, name:'失败'},
                            {value:0, name:'错误'}
                        ],
                        itemStyle: {
                            emphasis: {
                                shadowBlur: 10,
                                shadowOffsetX: 0,
                                shadowColor: 'rgba(0, 0, 0, 0.5)'
                            }
                        }
                    }
                ]
            };

            // 使用刚指定的配置项和数据显示图表。
            myChart.setOption(option);
        </script>
        
</body>
</html>
